<head>
	<meta name="layout" content="main" />
	<title>Create User</title>
</head>

<body>
	<div class="content">
		<h1>Create User</h1>
		<g:if test="${flash.message}">
			<div class="message">${flash.message}</div>
		</g:if>
		<g:hasErrors>
			<div class="errors">
				<g:renderErrors bean="${user}" as="list" />
			</div>
		</g:hasErrors>
		
		<g:form action="save">
			<fieldset class="form">
				
				<div class="fieldcontain ${hasErrors(bean: user, field: 'username', 'errors')} required">
					<label for="username">
						Login Name:
						<span class="required-indicator">*</span>
					</label>
					<g:textField type="text" id="username" name="username" required="" value="${fieldValue(bean: user, field: 'username')}"/>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: user, field: 'userRealName', 'errors')} required">
					<label for="userRealName">
						Full Name:
						<span class="required-indicator">*</span>
					</label>
					<g:textField type="text" id="userRealName" required="" name="userRealName"value="${fieldValue(bean: user, field: 'userRealName')}"/>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: user, field: 'passwd', 'errors')} required">
					<label for="passwd">
						Password:
						<span class="required-indicator">*</span>
					</label>
					<g:passwordField type="password" id="passwd" required="" name="passwd" value="${fieldValue(bean: user, field: 'passwd')}"/>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: user, field: 'passwdRepeat', 'errors')} required">
					<label for="passwdRepeat">
						Confirm Password:
						<span class="required-indicator">*</span>
					</label>
					<g:passwordField type="password" id="passwdRepeat" required="" name="passwdRepeat" value="${fieldValue(bean: user, field: 'passwdRepeat')}"/>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: user, field: 'email', 'errors')} required">
					<label for="email">
						Email:
						<span class="required-indicator">*</span>
					</label>
					<g:textField type="text" id="email" name="email" required="" value="${fieldValue(bean: user, field: 'email')}"/>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: user, field: 'contactPhoneNumber', 'errors')}">
					<label for="contactPhoneNumber">
						Phone Number for Notifications:
					</label>
					<g:textField type="text" id="contactPhoneNumber" name="contactPhoneNumber" value="${fieldValue(bean: user, field: 'contactPhoneNumber')}"/>
				</div>
				
				<div class="fieldcontain ${hasErrors(bean: user, field: 'contactEmail', 'errors')}">
					<label for="contactEmail">
						Email for Notifications:
					</label>
					<g:textField type="text" id="contactEmail" name="contactEmail" value="${fieldValue(bean: user, field: 'contactEmail')}"/>
				</div>	
			</fieldset>
			
			<div class="buttons">
				<span class="button">
					<g:submitButton class="save" name="user" value="Create" />
				</span>
			</div>
			
			
		</g:form>
	</div>
</body>
